import Vue from 'vue'
import Router from 'vue-router'

//引入视图
import Index from '@/components/index'
import Test from '@/components/test'
// import Notfound from '@/components/notfound'

//注册
Vue.use(Router)

let router = new Router({
    // mode:"history",
    routes: [
        {path: '/',redirect:"/index",},//主页面重定向  
        // { //默认显示页面
        //     path: '/index/:id',
        //     name: 'index',
        //     component: Index,
        // },
        { //默认显示页面
            path: '/index',
            name: 'index',
            component: Index,
        },
        {
            path: '/test',
            name: 'test',
            component: Test,
        }
        // { path: "/notfound", component: Notfound },
        // { path: "*", redirect:"/notfound"},
    ]
})


export default router;
